<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<LCA.Community.Web.Models.GroupViewModel>" %>
<%@ Import Namespace="LCA.Community.DAL.Model" %>
<%@ Import Namespace="LCA.Community.Web.Controllers" %>
<%@ Import Namespace="Microsoft.Web.Mvc" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContent" runat="server">
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcAjax.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
        function beginAnimation() {
            $('#loading').show();
        }

        function completeAnimation() {
            $('#loading').hide();
        }
    </script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <div class="content-main">
        <h2><img src="<%= Url.Content("~/Content/images/FinalDesign/Icons/users24.png") %>" />Miembros de <%= Model.Group.Name %></h2>
        <div style="margin-top:10px">    
        <%using (Ajax.BeginForm("RemoveMembers", "Group", new { groupID = Model.ID }, new AjaxOptions { InsertionMode = InsertionMode.Replace, UpdateTargetId = "members", OnBegin = "beginAnimation", OnComplete = "completeAnimation" })){ %>
           <% if((bool)ViewData["owner"]){ %>
           <%= Html.SubmitImage("userRemove", Url.Content("~/Content/images/FinalDesign/Icons/user_remove32.png"), new { alt = "Eliminar miembros.", style="display:inline;" })%>
           <img width="24px" id="loading" src="<%= Url.Content("~/Content/images/LCA_logo_rotor.gif") %>" alt="Cargando..." style="display:none;vertical-align:text-bottom;" />
           <%} %>
           <div id="members" class="list">
           <% Html.RenderPartial("ShowUsers",Model.Members); %>
           </div>
        <%} %>
        </div>
    </div>
    <div class="content-right">
        <% Html.RenderPartial("GroupMenu", Model.Group); %>
    </div>
</asp:Content>
